<template>
  <div>
      <h4>{{info.title}}</h4>
      <hr>
      <div v-html="info.content" class="content"></div>
  </div>
</template>
<script>
export default {
  data(){
      return{
          id:this.$route.params.id,
          info:{}
      }
  },
  created(){
this.getInfo()
  },
  methods:{
      getInfo(){
          this.$http.get('api/goods/getdesc/'+this.id).then(res=>{
              if(res.body.status==0){
                  this.info=res.body.message[0]

              }else{
                  console.log('获取详情失败')
              }
          })
      }
  }
}
</script>
<style lang="scss">
.content img{
    width:100%;
}
</style>
